# Sir. Cut Interpreter

This repository contains a Rust implementation of an interpreter for
the esoteric programming language [Sir. Cut](https://esolangs.org/wiki/Sir._Cut).

## Usage

### Library

Add this to your `Cargo.toml` (note that it isn't functional yet):

```toml
[dependencies]
sir-cut-esolang = "0.1"
```

Then use it like this:

<!-- TODO: update this when it actually works. -->

```rust
use sir_cut_esolang::Interpreter;

fn main() {
    let interpreter = Interpreter::new();

    // “Hello, World!” program from <https://esolangs.org/wiki/Sir._Cut#Hello.2C_World.21>.
    let output = interpreter::interpret("\
]@!@!@@!@!@@@@!@@!@@!@!@!@!@!@@!@!@@!@@@!@@!@!@@!@@@!\
@@!@!@@@@!@@!@!@!@@!@@@@!@!@@@@@@!@!@!@!@!@@@!@!@@!@!\
@@@@!@!@@@!@@!@!@@!@@!@!@@!@@@!@@!@@!@!@@@@!@!@@@@!@#");
}
```

### Executable

Install via Cargo (again, not functional yet):

```shell
cargo install sir-cut-esolang
```

Then use it like this:

<!-- TODO: update this when it actually works. -->

```shell
echo 'program input' | sircuti --interpret /path/to/the/program
```

## License

The Rust source code in this repository is licensed under the
[GNU General Public License][gpl], version 3 or (at your option)
any later version.

[gpl]: https://www.gnu.org/licenses/gpl.html
